# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-urlman
pkgver=2.0.1
pkgrel=1
pkgdesc="Django URL pattern helpers"
url="https://pypi.org/project/urlman/"
arch="noarch"
license="Apache-2.0"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/andrewgodwin/urlman/archive/$pkgver/py3-urlman-$pkgver.tar.gz"
builddir="$srcdir/urlman-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
3cef9633b602ff7c2fdedf0273889af79ba955664f265591272afb8b39fa7c8d319f39d9b39d8f32a02f1f57aca0382573fc0dbc1401a2be6e85ddd61f202a4e  py3-urlman-2.0.1.tar.gz
"
